package f.app.al;

import android.app.TabActivity;
import android.content.Intent;
import android.content.res.Resources;
import android.os.Bundle;
import android.widget.TabHost;

public class Menu extends TabActivity{
	public void onCreate(Bundle savedInstanceState) {
	    super.onCreate(savedInstanceState);
	    setContentView(R.layout.menu);

	    Resources res = getResources(); // Resource object to get Drawables
	    TabHost tabHost = getTabHost();  // The activity TabHost
	    TabHost.TabSpec spec;  // Resusable TabSpec for each tab
	    Intent intent;  // Reusable Intent for each tab

	    intent = new Intent().setClass(this, FinnanceActivity.class);
	    spec = tabHost.newTabSpec("main").setIndicator("Finance",
	                      res.getDrawable(R.drawable.money))
	                  .setContent(intent);
	    tabHost.addTab(spec);
	    
	    intent = new Intent().setClass(this, ListOfEntry.class);
	    spec = tabHost.newTabSpec("list").setIndicator("List",
	                      res.getDrawable(R.drawable.list))
	                  .setContent(intent);
	    tabHost.addTab(spec);
	   
	    intent = new Intent().setClass(this, Graph.class);
	    spec = tabHost.newTabSpec("graph").setIndicator("Graph",
	                      res.getDrawable(R.drawable.pie))
	                  .setContent(intent);
	    tabHost.addTab(spec);
	    
	    intent = new Intent().setClass(this, Budget.class);
	    spec = tabHost.newTabSpec("budget").setIndicator("Budget",
	                      res.getDrawable(R.drawable.budget))
	                  .setContent(intent);
	    tabHost.addTab(spec);
	    	    
	    tabHost.setCurrentTab(3);
	}
}
